package com.kaishengit.service;

import com.kaishengit.dao.ProjectDao;
import com.kaishengit.entity.Project;
import com.kaishengit.util.StringUtil;
import com.kaishengit.util.db.Page;

public class ProjectService {

	private ProjectDao dao = new ProjectDao();
	
	public void save(String name,String desc) {
		Project p = new Project();
		
		p.setName(name);
		p.setId(StringUtil.getId());
		p.setDesc(desc);
		dao.save(p);
	}
	public Page<Project> findByUserIdAndPageNum(String userId,int pageNum) {
		return dao.findByUserIdAndPageNum(userId,pageNum);
	}
	public Project findById(String id){
		return dao.findById(id);
	}
}
